home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / GameKit / Examples / PacMan / FruitView.h < prev    next >
Text File  |  1995-06-12  |  675b  |  27 lines

  1.  
  2. // This draw x fruits, depending on the level we're at.  Used in the
  3. // "Fruit Basket" window.
  4.  
  5. #import <appkit/appkit.h>
  6.  
  7. #define FRUIT_SIZE 16    // 32 pixels square
  8. #define FRUIT_PER_ROW 5    // per row on base image
  9. #define FRUIT_LEVELS 16    // # levels with fruit specified;
  10.         // after that, we use NeXTcubes.
  11.  
  12. extern int fruits[FRUIT_LEVELS + 1];
  13.  
  14.  
  15. @interface FruitView:View
  16. {
  17.     id   fruit;        // image with all the fruit in it.
  18.     
  19.     int  lastLevel;    // highest level reached by player.
  20. }
  21.  
  22. - initFrame:(const NXRect *)frm;    // initialize instance
  23. - drawSelf:(NXRect *)rects :(int)rectCount;  // standard rendering method
  24. - showLevel:(int)num;                // draw all fruits up to level
  25.  
  26. @end
  27.